﻿using Basic.FlowRemoteModel;
using Basic.FlowRemoteModel.FlowNode.Model;
using SqlSugar;

namespace Basic.FlowModel.Node
{
    public class NodeCheck
    {
        public long Id
        {
            get;
            set;
        }
        public string NodeName { get; set; }

        public FlowNodeType NodeType
        {
            get;
            set;
        }
        public FlowAuditType AuditType
        {
            get;
            set;
        }
        public long? FormId
        {
            get;
            set;
        }

        /// <summary>
        /// 审批意见是否必填
        /// </summary>
        public bool OpinionMust
        {
            get;
            set;
        }
        public FlowAuditButton AuditButton
        {
            get;
            set;
        }
        /// <summary>
        /// 回退到的节点ID 为空=选择回退节点
        /// </summary>
        public long? BackNodeId
        {
            get;
            set;
        }

        /// <summary>
        /// 节点进入的条件
        /// </summary>
        public FlowNodeIntoCondition IntoCondition
        {
            get;
            set;
        }
        public long? IntoWaitNodeId
        {
            get;
            set;
        }
        /// <summary>
        /// 节点进入的最小通过人数
        /// </summary>
        public short? IntoMinPassNum
        {
            get;
            set;
        }
        [SugarColumn(IsJson = true)]
        public IntoFormula[] IntoFormula
        {
            get;
            set;
        }
        /// <summary>
        /// 节点下发流程出策略
        /// </summary>
        public FlowNodeOutPolicy OutPolicy
        {
            get;
            set;
        }
        /// <summary>
        /// 出方向条件
        /// </summary>
        public FlowOutCondition OutCondition
        {
            get;
            set;
        }
        /// <summary>
        /// 出方向子流程最小通过数
        /// </summary>
        public short? OutMinPassNum
        {
            get;
            set;
        }
        public long? OutWaitNodeId
        {
            get;
            set;
        }
    }
}
